local SheildShow = class("SheildShow")

function SheildShow:ctor(manager)
    self._manager = manager
end

function SheildShow:show(sheildParam)
    if sheildParam.add then
        return self:_sheild_add(sheildParam)
    elseif sheildParam.remove then
        return self:_sheild_remove(sheildParam)
    end
    return 0
end

function SheildShow:_sheild_add(param)
    local actor = self._manager:findActorbyId(param.entityId)
    actor:addSheild(param.baseId)
    return 0
end

function SheildShow:_sheild_remove(param)
    local actor = self._manager:findActorbyId(param.entityId)
    actor:removeSheild(param.baseId)
    return 0
end

return SheildShow
